#include<func.h>
#include<mysql/mysql.h>

int main()
{
    MYSQL* mysql=mysql_init(NULL);
    if(mysql==NULL)
    {
        printf("%s\n",mysql_error(mysql));
    }

    if(!mysql_real_connect(mysql,"localhost","root","123456","homework",0,NULL,0))
       {
       printf("%s\n",mysql_error(mysql));
       }

       int ret=mysql_query(mysql,"update  s set name='大司马' where no=201813"); 
       if(ret==0)
       printf("执行成功\n");
       else
       printf("执行失败\n");

       }
